package com.earthchen.core.support.shiro.provider.impl;


import com.earthchen.core.support.shiro.domain.Account;
import com.earthchen.core.support.shiro.provider.AccountProvider;
import com.earthchen.core.support.shiro.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.stereotype.Service;

/* *
 * @Author tomsun28
 * @Description
 * @Date 9:22 2018/2/13
 */
@Service
@ConditionalOnMissingBean(name = "accountProvider")
public class AccountProviderImpl implements AccountProvider {

    @Autowired
    private AccountService accountService;

    @Override
    public Account loadAccount(String appId) {
        return accountService.loadAccount(appId);
    }
}
